package lk.icta.common.entity;

import lk.icta.core.entity.ModuleType;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author Mahesha Kalpanie
 */
@Entity
@Table(schema = "COMMON_RAIL")
@NamedQueries({
        @NamedQuery(
                name = "getDocumentCategoryList",
                query = "SELECT dc FROM DocumentCategory dc"
        ),
        @NamedQuery(
                name = "getDocumentCategoryListByModuleId",
                query = "SELECT dc FROM DocumentCategory dc where dc.moduleId = :moduleId"
        )
})
public class DocumentCategory implements Serializable {
    /**
     * A system generated unique key
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;

    @Column(nullable = false)
    private String categoryName;

    @Column(nullable = false)
    private int moduleId;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public int getModuleId() {
        return moduleId;
    }

    public void setModuleId(int moduleId) {
        this.moduleId = moduleId;
    }
}
